home *** CD-ROM | disk | FTP | other *** search
- Path: news.aimnet.com!news
- From: chips@pacx.com (Chip)
- Newsgroups: comp.lang.c++
- Subject: Pointers to floating points
- Date: Fri, 01 Mar 1996 15:57:19 GMT
- Organization: IMV Internet
- Message-ID: <4h76m0$2n0@news.aimnet.com>
- NNTP-Posting-Host: dial-milp-23.iway.aimnet.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- I am using Turbo C++ 3.0 for DOS. When compiling this code:
-
- float calcPayment ()
- {
- float temp, temp2; //Holding variables
- temp = (*Principal * *Interest) * pow(1 + *Interest, *Months);
-
- temp2 = pow(1 + *Interest, *Months) - 1;
- return (temp / temp2); //Return the value
- }
-
- I get the error "illegal use of floating point" in several places.
- When I looked up the error, it said that pointers to floating points
- cannot be used... is this true, people? Is that a characteristic of
- pointers, or is there something I am missing?
-
- Thank you.
-
-